package StudyCode.summary.myfile;

import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetIterablePathArrayOfPath {
	public static void main(String[] args) {
		Iterable<Path> dirs = FileSystems.getDefault().getRootDirectories();
		List<Path> list = new ArrayList<Path>();
		for (Path name : dirs) {
			System.out.println(name);
			list.add(name);
		}
		Path[] arr = new Path[list.size()];
		list.toArray(arr);

		for (Path path : arr) {
			System.out.println(path);
		}

	}
}
